package com.github.boluo1230.wechat.feign.fallback;

import com.github.boluo1230.wechat.entity.WxUser;
import com.github.boluo1230.wechat.feign.WxAPI;
import feign.hystrix.FallbackFactory;

/**
 * @author Code Farmer
 * @date 2019/10/14 16:11
 */
public class WxAPIFallback implements FallbackFactory<WxAPI> {

    @Override
    public WxAPI create(Throwable throwable) {
        return new WxAPI() {
            @Override
            public WxUser getWxUser(String accessToken, String openId) {
                return null;
            }
        };
    }
}
